import Vue from "vue";
import VueRouter from "vue-router";
import Mylogin from "@/views/Mylogin";
import Login from "@/views/Login";
import Register from "@/views/Register";
import Subject from "@/views/Subject";
import Chart from "@/views/Chart";
import Information from "@/views/Information";
import Score from "@/views/Score";

Vue.use(VueRouter);
const router = new VueRouter({
  routes: [
    {
      path: "/subject",
      component: Subject,
      redirect: '/subject/chart',
      children: [
        { path: 'chart', component: Chart },
        { path: 'information', component: Information },
        { path: 'score', component: Score }
      ]
    },
    {
      path: "/",
      component: Mylogin,
      redirect: '/Login',
      children: [
        { path: 'Login', component: Login },
        { path: 'Register', component: Register }
      ]
    },
  ],
});
export default router;